package org.learn.test;

public class VarParameterExercise {
    public static void main(String[] args) {
        HspMethod h1 = new HspMethod();
        h1.showScore("张胜洪",60,76,86,59,90);
    }
}
class HspMethod{
    public void showScore(String name,int...n){
        double res = 0;
        for(int i = 0;i < n.length;i++){
            res += n[i];
        }
        System.out.println("姓名\t" + name + "\n成绩总分=" + res);
    }
}